package com.dingreading.cloud.soms.service;

import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.soms.dto.StoreProductDto;
import com.dingreading.cloud.soms.entity.StoreProducts;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2024-09-11
 */
public interface StoreProductsService extends IService<StoreProducts> {

    boolean updateEnabled(String storeUid, String uid, Integer enabled, String staffUid, String staffName);

    int dropBean(String storeUid, String uid);

    boolean haveName(String storeUid, String uid, String productName);

    StoreProducts getByUid(String uid);

    int getMaxOrderNum(String storeUid);

    StoreProducts getGtShowOrder(String storeUid, Integer orderNum);

    StoreProducts getLtShowOrder(String storeUid, Integer orderNum);

    /**
     * 设置序号
     */
    boolean updateOrderNum(String storeUid, String uid, Integer orderNum, String staffUid, String staffName);

    StoreProducts getByStoreUidOrUid(String storeUid, String uid);

    Page<StoreProducts> storePageList(PageUtil pageUtil, String storeUid, String keyword, Integer enabled);

    List<StoreProducts> getListV2(String storeUid, String keyword, Integer productType, String cooperationTypeSql, String operationTypeSql);

    List<StoreProductDto> getDtoListV2(String storeUid, String cooperationTypeSql, String operationTypeSql);

    List<StoreProducts> listByUids(List<String> productUids);

}
